<?php

use Jialeo\LaravelSchemaExtend\Schema;
use Illuminate\Database\Schema\Blueprint;
use Illuminate\Database\Migrations\Migration;

class CreateGroupsTable extends Migration
{
    /**
     * Run the migrations.
     *
     * @return void
     */
    public function up()
    {
        Schema::create('groups', function (Blueprint $table) {
            $table->increments('id');
            $table->string('group_name')->comment('群名称');
            $table->integer('user_id')->comment('创建人');
            $table->integer('lord_id')->comment('群主');
            $table->string('avatar')->comment('群头像');
            $table->string('group_notice')->comment('群公告');
            $table->timestamps();

            $table->comment = '群基本信息';
        });
    }

    /**
     * Reverse the migrations.
     *
     * @return void
     */
    public function down()
    {
        Schema::dropIfExists('groups');
    }
}
